package com.seng.resourcetycoon.core.enums;

/**
 * Represents the different difficulty levels available in the game, each level influencing various gameplay aspects such as
 * resource generation rates, initial coin allocation, and point multipliers for completing tasks or challenges.
 */
public enum DifficultyLevel {
    /**
     * Easy difficulty level, suitable for players seeking a relaxed gaming experience with ample resources and generous rewards.
     */
    EASY("Easy", 1.0, 1000, 1),

    /**
     * Medium difficulty level, offering a balanced challenge for players who desire a moderate level of resource scarcity and
     * increased competition for rewards.
     */
    MEDIUM("Medium", 1.2, 800, 2),

    /**
     * Hard difficulty level, designed for experienced players seeking a challenging experience with limited resources and
     * higher potential rewards for strategic play.
     */
    HARD("Hard", 1.5, 600, 3);

    /**
     * Human-readable display name for the difficulty level, shown to the player when selecting a difficulty.
     */
    private final String displayName;

    /**
     * Multiplier applied to resource generation rates. Higher difficulty levels typically have lower resource generation rates,
     * making resource management more critical.
     */
    private final double resourceMultiplier;

    /**
     * Initial amount of coins provided to the player at the start of the game based on the selected difficulty level.
     */
    private final int initialCoins;

    /**
     * Point multiplier applied to rewards earned by the player for completing tasks or challenges. Higher difficulty levels
     * generally offer higher point multipliers, incentivizing players to take on greater challenges for potentially greater rewards.
     */
    private final int pointMultiplier;

    /**
     * Constructs a DifficultyLevel instance with the given display name, resource multiplier, initial coins, and point multiplier.
     *
     * @param displayName      Human-readable name for the difficulty level.
     * @param resourceMultiplier Multiplier applied to resource generation rates.
     * @param initialCoins     Initial amount of coins provided to the player.
     * @param pointMultiplier  Point multiplier applied to rewards earned by the player.
     */
    DifficultyLevel(String displayName, double resourceMultiplier, int initialCoins, int pointMultiplier) {
        this.displayName = displayName;
        this.resourceMultiplier = resourceMultiplier;
        this.initialCoins = initialCoins;
        this.pointMultiplier = pointMultiplier;
    }

    /**
     * Returns the human-readable display name for this difficulty level.
     *
     * @return The display name of the difficulty level.
     */
    public String getDisplayName() {
        return displayName;
    }

    /**
     * Retrieves the resource multiplier associated with this difficulty level.
     *
     * @return The resource multiplier as a double value.
     */
    public double getResourceMultiplier() {
        return resourceMultiplier;
    }

    /**
     * Gets the initial amount of coins provided to the player when starting a game with this difficulty level.
     *
     * @return The initial coin count as an integer.
     */
    public int getInitialCoins() {
        return initialCoins;
    }

    /**
     * Returns the point multiplier applied to rewards earned by the player when playing at this difficulty level.
     *
     * @return The point multiplier as an integer.
     */
    public int getPointMultiplier() {
        return pointMultiplier;
    }
}